import request from '@/utils/request'
//获取所有高中分页列表
export function getList(params) {
  return request({
    url: '/mgrService/highSchool/highSchoolByPage', // 分页列表
    method: 'post',
    data: params
  })
}

// 根据高校名称和地区模糊查询
export function getNameList(params) {
  return request({
    url: '/mgrService/highSchool/list',
    method: 'post',
    data: params
  })
}

// -----------------------------------------------
//获取教师列表
export function getLists(params) {
  return request({
    url: '/mgrService/highSchool/highSchoolTeacherByPage',
    method: 'post',
    data: params
  })
}
//根据教师名字/所属学校。。。筛选教师

export function searchList(params) {
  return request({
    url: '/mgrService/highSchool/teacherByFilter',
    method: 'post',
    data: params
  })
}

export function getAreaList() {
  return request({
    url: '/manager/area/areaCascadeSupply',
    method: 'post'
  })
}

export function getSchoolsById(id) {
  return request({
    url: `/manager/school/schoolsByAreaId/${id}`,
    method: 'get'
  })
}

export function getIds(id) {
  return request({
    url: `/mgrService/highSchool/queryTeacherInfoById/${id}`,
    method: 'get',
    data: id
  })
}
//保存教师信息
export function updates(params) {
  return request({
    url: '/mgrService/highSchool/updateTeacherInfo',
    method: 'post',
    data: params
  })
}

// POST / users/userForbidden
// 认证教师
export function teacherAudit(params) {
  return request({
    url: '/mgrService/highSchool/updateTeacherAudit',
    method: 'post',
    data: params
  })
}

// /school/schoolsByTitle/{title}
// 根据学校名称模糊查询学校
export function getSchoolsByTitle(params) {
  return request({
    url: `/manager/school/schoolsByTitle`,
    method: 'post',
    data: params
  })
}

// 通过地区筛选教师集合(判断这个区域是否有老师)
export function getAreateacher(params) {
  return request({
    url: `/mgrService/highSchool/getHighSchoolTeacherList`,
    method: 'post',
    data: params
  })
}

// 开通高中PC生涯测评系统
export function openSchoolPcReport(params) {
  return request({
    url: '/mgrService/highSchool/addSchoolPcReportById',
    method: 'post',
    data: params
  })
}

// 关闭高中PC生涯测评系统
export function closeSchoolPcReport(params) {
  return request({
    url: '/mgrService/highSchool/deleteSchoolPcReportById',
    method: 'post',
    data: params
  })
}

// 开通高中后台管理系统
export function openSchoolManage(params) {
  return request({
    url: '/mgrService/highSchool/addSchoolManageById',
    method: 'post',
    data: params
  })
}

// 关闭高中后台管理系统
export function closeSchoolManage(params) {
  return request({
    url: '/mgrService/highSchool/closeIsSchoolById',
    method: 'post',
    data: params
  })
}

// 根据学校id查询用户信息
export function querySchoolUserInfo(schoolId) {
  return request({
    url: `/mgrService/highSchool/querySchoolUserInfo/${schoolId}`,
    method: 'get',
    data: schoolId
  })
}

// 编辑学校开通用户信息
export function updateSchoolUserInfo(params) {
  return request({
    url: '/mgrService/highSchool/updateSchoolUserInfo',
    method: 'post',
    data: params
  })
}

// 通过标识名school查询权限
export function queryPermissions(params) {
  return request({
    url: '/mgrService/highSchool/queryPermissions',
    method: 'post',
    data: params
  })
}
